package com.youle.mapper;

import com.youle.item.pojo.Spu;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * Created by
 *
 * @author touni
 * @date 2019/4/22
 * @time 15:47
 */
@Component
public interface SpuMapper extends Mapper<Spu> {

    @Select("SELECT * FROM tb_spu WHERE saleable=#{saleable} AND (title LIKE #{key} OR sub_title LIKE #{keya})")
    List<Spu> selectBykeyAndSaleable(Boolean saleable,String key,String keya);
}
